#include<iostream>
#include<cstring>
#include<cmath>
using namespace std;

double f(double x) {
	double y1;
	y1 = x * x * x + 2 * x * x + 3 * x + 4;
	return y1;

}

double f_d(double x) {
	double y2;

	y2 = 3 * x * x + 4 * x + 3;
	return y2;
}


double my_function(double x_k_1, double eps) {
	double x_k;

	while (abs(f(x_k_1)) > eps) {

		x_k = x_k_1 - f(x_k_1) / f_d(x_k_1);
		x_k_1 = x_k;

	}

	return x_k;

}


int main() {
	double x1;
	double eps;
	double y;

	cin >> x1 >> eps;

	y = my_function(x1,  eps);

	cout << y;


	return 0;
}
